VHL.ExchangeAPDU
This command sends APDUs to the currently selected card. APDUs are the communication units between a reader and an ISO 14443-4 card. They're defined in the ISO/IEC 7816-4 standard. VHL.ExchangeAPDU transmits the actual APDU command via the Cmd parameter and returns the APDU response as Resp.
Keep an eye on the frame size
The combined size of transmitted and received APDU data (i.e. the combined size of Cmd and Resp ) must not exceed the maximum frame size supported by your reader's firmware version. To check the maximum frame size, run Sys.GetBufferSize and refer to the TotalSize response value.
For larger amount of data, please use VHL.ExchangeLongAPDU instead.
No error correction or retry mechanisms
The reader firmware does not perform any error handling operations with ISO/IEC 7816-4 inter-industry commands. Errors will be directly reported as part of the Resp value without further action, so you have to take care of error handling in your application.
Properties
- Command code: 0x0106
- Command timeout: 60000 ms
- Possible status codes: General status codes, VHL.ErrNoTag, VHL.ErrCardNotSelected, VHL.ErrHf, VHL.ErrHw, VHL.ErrApdu
Parameters (request frame)
Name | Type/Size | Description | |
---|---|---|---|
AssumedCardType | Enumeration (8 bits) |
Forces the reader to assume a certain card type. By default (i.e. if CardType is 0x00), the reader uses the card type detected by VHL.Select. The type of the selected card. Since there are no reliable identification standards amongst card manufacturers, we use a heuristic that examines the UID, its length, and other information as documented here. Due to the lack of standards, we cannot guarantee the card type is always identified correctly. Values:
|
|
Length of Cmd | Integer (16 bits) |
Length of Cmd in bytes |
|
Cmd | Raw data | APDU command data |
Returned values (response frame)
Name | Type/Size | Description |
---|---|---|
Length of Resp | Integer (16 bits) |
Length of Resp in bytes |
Resp | Raw data | APDU response data |